<?php

require_once './config.php';

$id = $_REQUEST['id'];

$sql = "SELECT *FROM jiagou WHERE id='$id'";
$result = mysqli_query($conn,$sql);
// $arr = mysqli_fetch_assoc($result);
while($data = mysqli_fetch_assoc($result)){
    $arr[] = $data;
}
echo json_encode(array(
    'code' => 1,
    'data' => $arr
));